<%--
  Created by IntelliJ IDEA.
  User: 86152
  Date: 2020/12/6
  Time: 23:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title></title>
  </head>
  <script type="text/javascript" >
      function changeCodeImg(){
          var num=Math.ceil(Math.random()*10);//生成一个随机数（防止缓存）
          var  a=document.getElementById("vimg");
          a.src="${pageContext.request.contextPath}/getSecurityCode?"+num;
      }
  </script>
  <body>
 <form action="login" method="post">
     <input type="text" name="code">
   <span style="text-align: center;">
                            <img id="vimg" src="${pageContext.request.contextPath}/getSecurityCode" title="换一张"
                onclick="changeCodeImg()">
                        </span>
     <input type="submit">
<p>${error}</p>
 </form>
  </body>

</html>
